<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="a" uri="/agou-tags"%>
<!DOCTYPE HTML>
<html>
<head><title>用户登陆</title>
	<%@include file="../../../web.inc"%>
</head>
<body>
	<form name="dataform1" method="post">
		<div id="outline">
			<div id="wrapper">
				<div id="branding">
					<div class="logo"></div>
					<div class="help">
						<a href="<%=WebRoot %>/#">FAQ</a>
					</div>
				</div>
				<div class="clearer"></div>
				<div id="masthead"></div>
				<div class="clearer"></div>
				<div class="app_header" align="center"></div>
				<div class="sycontent">
					<div class="preForm"></div>
						<div class="sycontentBoxerror"></div>
						<div class="sycontentRow">
							<div class="sycontentBoxL0">用&nbsp;&nbsp;户&nbsp;&nbsp;名</div>
							<div class="sycontentBoxM">
								<input id="userVo_userLoginId" name="userVo.userLoginId"  type="text"
									class="sycontentBoxMinput" size="18" value=""
									onkeypress="eventOnkeypress(event,1);" autocomplete="off">
							</div>
						</div>
						<div class="sycontentRow">
							<div class="sycontentBoxL0">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</div>
							<div class="sycontentBoxM">
								<input id="userVo_password" name="userVo.password"  type="password" size="18" autocomplete="off" 
									onkeypress="eventOnkeypress(event,2);" class="sycontentBoxMinput">
							</div>
							<div class="sycontentBoxMForgot">
								<a href="javascript:void(0);" onclick="callManageClick()">忘记密码？</a>
							</div>
						</div>
						<div class="sycontentRow">
							<div class="sycontentBoxL"></div>
							<div class="sycontentBoxRbtnbox">
								<button id="OK" name="OK" type="button" class="sycontentBoxRbtn"  onClick="funUserLogin(this)">登陆</button>
								<button id="Register" name="Register" type="button" class="sycontentBoxRbtn" onClick="funOpenUserRegister(this)">注册</button>
								<button id="Cancel" name="Cancel" type="button" class="sycontentBoxRbtn" onClick="funFormReset(this)">重置</button>
							</div>
						</div>
				</div>
				<div class="clearer"></div>
				<div class="footer">
					<div class="copyright">Copyright © 2013 红房子工作室</div>
				</div>
			</div>
		</div>
	</form>

	<div id="winUserRegister" class="easyui-window" title="【用户注册】"
		data-options="modal:true,closed:true,iconCls:'icon-save'"
		style="width: 500px; height: 320px; padding: 10px;">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'center'" style="padding:10px;">
				<form id="registerForm" name="registerForm" method="post">
					<table>
						<tr>
							<td>用户名：</td>
							<td><input class="easyui-validatebox" type="text" name="userVo.userLoginId" data-options="required:true"></td>
						</tr>
						<tr>
							<td>密码：</td>
							<td><input class="easyui-validatebox" type="text" name="userVo.password" data-options="required:true"></td>
						</tr>
						<tr>
							<td>安全类型：</td>
							<td><select class="easyui-combobox" name="userVo.securityType">
									<%
										EnAdminUserSecurityType[] enums = EnAdminUserSecurityType.values();
										for (int i = 0; i < enums.length; i++) {
									%>
									<option value="<%=enums[i].getCode()%>"><%=enums[i].getName()%></option>
									<%}%></select></td>
						</tr>
						<tr>
							<td>编码类型：</td>
							<td>
							<select class="easyui-combobox" name="userVo.passCoding">
									<%
									EnAdminUserSecurityPassConding[] enums2 = EnAdminUserSecurityPassConding.values();
										for (int i = 0; i < enums2.length; i++) {
									%>
									<option value="<%=enums2[i].getCode()%>"><%=enums2[i].getName()%></option>
									<%}%></select></td>
						</tr>
						<tr>
							<td>描述：</td>
							<td><textarea name="userVo.remark" style="height:60px;"></textarea></td>
						</tr>
					</table>
				</form>
			</div>
			<div data-options="region:'south',border:false" style="text-align:right;padding:5px 0 0;">
				<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="javascript:funUserRegister(this)">确认</a>
				<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="javascript:funCloseUserRegister(this)">关闭</a>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	if(g_appcontext.userLoginId != ""){
		$('#userVo_userLoginId')[0].value = g_appcontext.userLoginId;
	}
	<%
	//检查用户是否登陆成功
	if(dataSet != null && dataSet.IsSuccess == false){//登陆失败
	%>
	$.messager.alert('登陆失败','<%=dataSet.ReturnInfo%>!','error');
	<%	
	}
	%>
	</script>
</body>
</html>